//
//  MacroDefinition.h
//  DiceGame
//
//  Created by 航汇聚科技 on 2017/8/10.
//  Copyright © 2017年 Yi Zhou. All rights reserved.
//

#ifndef MacroDefinition_h
#define MacroDefinition_h

#ifdef DEBUG
// %s, ,__FILE__  文件所在路径
#define YLog(fmt,...) NSLog((@"%s\t<LINE: %d>\n" fmt), __FUNCTION__, __LINE__, ##__VA_ARGS__);

#else

#define YLog(...);

#endif


// window
#define kWindow [UIApplication sharedApplication].keyWindow
// application
#define kApplication [UIApplication sharedApplication]

// 屏幕尺寸
#define kScreenWidth [UIScreen mainScreen].bounds.size.width
#define kScreenHeight [UIScreen mainScreen].bounds.size.height

// kCurrentDeviceSystemVersion
#define kCurrentDeviceSystemVersion [[[UIDevice currentDevice] systemVersion] floatValue]

// 颜色
#define kColorWithRGB(r, g, b) [UIColor colorWithRed:(r) / 255.f green:(g) / 255.f blue:(b) / 255.f alpha:1.f]
#define kColorFromHex(s)  [UIColor colorWithRed:(((s & 0xFF0000) >> 16))/255.0 green:(((s & 0xFF00) >>8))/255.0 blue:((s & 0xFF))/255.0 alpha:1.0]
#define kWhiteColor  [UIColor whiteColor]

// 字体
#define kFontSize(size) [UIFont systemFontOfSize:size]
#define kPMZDFamilyFontSize(ss) [UIFont fontWithName:@"PangMenZhengDao" size:ss];

//
#define kImage(imageName) [[UIImage imageNamed:imageName] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]

// weakSelf
#define kWeakSelf(weakSelf)      __weak typeof(&*self) weakSelf  = self;


// kNotificationCenter
#define kNotificationCenter  [NSNotificationCenter defaultCenter]
#define kUserDefaults [NSUserDefaults standardUserDefaults]


#endif /* MacroDefinition_h */
